<?php
namespace App\Adshopuser\Controllers;
use App\Adshopuser\Models\BShopGoodsCategory;
use App\Adshopuser\Models\BShopOperationLog;
use App\Adshopuser\Models\BshopUsersInfo;
use Common\ControllerAdshopBase;
use Common\Models\AppConfig;
use Common\Models\BShopUsers;
use Common\Models\FVerificationCodes;
use Common\Models\FWalletsShopAmountLog;
use Common\Models\FWalletsShopFreezeAmountLog;
use Common\Models\User;

class OperationController extends ControllerAdshopBase
{

    public function initialize()
    {
        parent::initialize();
    }

    public function logAction(){
        if(!isset($this->params['page']) || empty($this->params['page'])){
            $this->params['page'] = 1;
        }
        if(!isset($this->params['limit']) || empty($this->params['limit'])){
            $this->params['limit']=10;
        }
        $this->params['shop_id'] = $this->user_admin['id'];
        $BShopOperationLogDb = new BShopOperationLog();
        $get_list = $BShopOperationLogDb->get_list($this->params);
        $this->ok($get_list);
    }


    /**
     * 店铺资金冻结日志
     */
    public function shop_freezelistAction(){
        if(!isset($this->params['page']) || empty($this->params['page'])){
            $this->params['page'] = 1;
        }
        if(!isset($this->params['limit']) || empty($this->params['limit'])){
            $this->params['limit']=10;
        }
        $this->params['shop_id'] = $this->user_admin['id'];
        $FWalletsShopFreezeAmountLogDb = new FWalletsShopFreezeAmountLog();
        $get_list = $FWalletsShopFreezeAmountLogDb->admin_get_list($this->params);
        $this->ok($get_list);
    }



    /**
     * 店铺余额日志
     */
    public function shop_amountlistAction(){
        if(!isset($this->params['page']) || empty($this->params['page'])){
            $this->params['page'] = 1;
        }
        if(!isset($this->params['limit']) || empty($this->params['limit'])){
            $this->params['limit']=10;
        }
        $this->params['shop_id'] = $this->user_admin['id'];
        $FWalletsShopAmountLogDB = new FWalletsShopAmountLog();
        $get_list = $FWalletsShopAmountLogDB->admin_get_list($this->params);
        $this->ok($get_list);
    }
}
